package com.softeem.set;

import java.util.Set;
import java.util.TreeSet;

public class TreeSetDemo {

	public static void main(String[] args) {
		Set set = new TreeSet();
//		set.add(10);
//		set.add(20);
		set.add(new Student(28));
		set.add(new Student(16));
		set.add(new Student(18));
		set.add(new Student(18));
//		set.add(new String("hello"));//ClassCastException
		System.out.println(set);

	}

}
